import {http} from '@/libs/httpRequest';

// 表格数据
export function getList (params) {
    return http({
        url: '/admin/menu/list',
        method: 'get',
        params: params
    })
}

// 保存菜单
export function save (data) {
    return http({
        url: '/admin/menu/save',
        method: 'post',
        data: data
    })
}

// 修改菜单
export function update (data) {
    return http({
        url: '/admin/menu/update',
        method: 'post',
        data: data
    })
}

//删除菜单
export function remove(data){
    return http({
        url:'/admin/menu/delete',
        method:'delete',
        data:data
    })
}


//获取用户菜单
export function getUserMenu (params) {
  return http({
    url: '/admin/menu/getUserMenu',
    method: 'get',
    params: params
  })
}


//获取菜单路由
export function getMenuRoute (params) {
  return http({
    url: '/admin/menu/getMenuRoute',
    method: 'get',
    params: params
  })
}


//获取菜单树
export function treeData (params) {
  return http({
    url: '/admin/menu/treeData',
    method: 'get',
    params: params
  })
}
